package com.chujian.framework.util;

import static cn.hutool.core.date.DatePattern.*;

/**
 * 时间格式总体约束
 *
 * @author yj
 * @since 2021年12月11日
 */
public interface IDatePattern {

    String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
    String DATE_PATTERN = "yyyy-MM-dd";
    String TIME_PATTERN = "HH:mm:ss";

    String YEAR_MONTH_PATTERN = "yyyy-MM";
    String HOUR_MIN_PATTERN = "HH:mm";

    String DEFAULT_YEAR_FORMAT = "yyyy";
    String DEFAULT_MONTH_FORMAT = "yyyy-MM";
    String DEFAULT_MONTH_FORMAT_SLASH = "yyyy/MM";
    String DEFAULT_MONTH_FORMAT_EN = "yyyy年MM月";
    String DEFAULT_WEEK_FORMAT = "yyyy-ww";
    String DEFAULT_WEEK_FORMAT_EN = "yyyy年ww周";
    String DEFAULT_DATE_FORMAT = NORM_DATE_PATTERN;
    String DEFAULT_DATE_FORMAT_EN = CHINESE_DATE_PATTERN;
    String DEFAULT_DATE_TIME_FORMAT = NORM_DATETIME_PATTERN;
    String DEFAULT_DATE_TIME_FORMAT_EN = CHINESE_DATE_TIME_PATTERN;
    String DEFAULT_TIME_FORMAT = NORM_TIME_PATTERN;
    String DAY = "DAY";
    String MONTH = "MONTH";
    String WEEK = "WEEK";

    String DEFAULT_DATE_FORMAT_MATCHES = "^\\d{4}-\\d{1,2}-\\d{1,2}$";
    String DEFAULT_DATE_TIME_FORMAT_MATCHES = "^\\d{4}-\\d{1,2}-\\d{1,2} {1}\\d{1,2}:\\d{1,2}:\\d{1,2}$";
    String DEFAULT_DATE_FORMAT_EN_MATCHES = "^\\d{4}年\\d{1,2}月\\d{1,2}日$";
    String DEFAULT_DATE_TIME_FORMAT_EN_MATCHES = "^\\d{4}年\\d{1,2}月\\d{1,2}日\\d{1,2}时\\d{1,2}分\\d{1,2}秒$";
    String SLASH_DATE_FORMAT_MATCHES = "^\\d{4}/\\d{1,2}/\\d{1,2}$";
    String SLASH_DATE_TIME_FORMAT_MATCHES = "^\\d{4}/\\d{1,2}/\\d{1,2} {1}\\d{1,2}:\\d{1,2}:\\d{1,2}$";
    String SLASH_DATE_FORMAT = "yyyy/MM/dd";
    String SLASH_DATE_TIME_FORMAT = "yyyy/MM/dd HH:mm:ss";
    String CRON_FORMAT = "ss mm HH dd MM ? yyyy";

}
